USE [BillManage]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Bill_PropertyDown](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[FDate] [datetime] NOT NULL,
	[FRDate] [datetime] NOT NULL,
	[FCid] [int] NOT NULL,
	[FName] [varchar](100) NOT NULL,
	[FCName] [varchar](50) NULL,
	[FBCode] [varchar](50) NOT NULL,
	[FBillNo] [varchar](50) NOT NULL,
	[FVerifyCode] [decimal](18, 0) NOT NULL,
	[FAmount] [decimal](18, 2) NOT NULL,
	[FUid] [int] NOT NULL,
	[FUName] [varchar](50) NOT NULL,
	[FVid] [int] NULL,
	[FVName] [varchar](50) NULL,
	[FCancel] [int] NOT NULL,
	[FPCount] [int] NOT NULL,
	[FOrgid] [int] NOT NULL,
	[FBType] [int],
	[FItem1] [int] NOT NULL,
	[FItemName1] [varchar](50) NOT NULL,
	[FSDate1] [date] NOT NULL,
	[FEDate1] [date] NOT NULL,
	[FDays1] [decimal](18, 0) NOT NULL,
	[FQty1] [decimal](18, 2) NOT NULL,
	[FPrice1] [decimal](18, 2) NOT NULL,
	[FAcc1] [decimal](18, 2) NOT NULL,
	[FItem2] [int],
	[FItemName2] [varchar](50),
	[FSDate2] [date],
	[FEDate2] [date],
	[FDays2] [decimal](18, 0),
	[FQty2] [decimal](18, 2),
	[FPrice2] [decimal](18, 2),
	[FAcc2] [decimal](18, 2),
	[FItem3] [int],
	[FItemName3] [varchar](50),
	[FSDate3] [date],
	[FEDate3] [date],
	[FDays3] [decimal](18, 0),
	[FQty3] [decimal](18, 2),
	[FPrice3] [decimal](18, 2),
	[FAcc3] [decimal](18, 2),
	[FItem4] [int],
	[FItemName4] [varchar](50),
	[FSDate4] [date],
	[FEDate4] [date],
	[FDays4] [decimal](18, 0),
	[FQty4] [decimal](18, 2),
	[FPrice4] [decimal](18, 2),
	[FAcc4] [decimal](18, 2),
	[FItem5] [int],
	[FItemName5] [varchar](50),
	[FSDate5] [date],
	[FEDate5] [date],
	[FDays5] [decimal](18, 0),
	[FQty5] [decimal](18, 2),
	[FPrice5] [decimal](18, 2),
	[FAcc5] [decimal](18, 2),
	[FItem6] [int],
	[FItemName6] [varchar](50),
	[FSDate6] [date],
	[FEDate6] [date],
	[FDays6] [decimal](18, 0),
	[FQty6] [decimal](18, 2),
	[FPrice6] [decimal](18, 2),
	[FAcc6] [decimal](18, 2),
	[FItem7] [int],
	[FItemName7] [varchar](50),
	[FSDate7] [date],
	[FEDate7] [date],
	[FDays7] [decimal](18, 0),
	[FQty7] [decimal](18, 2),
	[FPrice7] [decimal](18, 2),
	[FAcc7] [decimal](18, 2),
	[FItem8] [int],
	[FItemName8] [varchar](50),
	[FSDate8] [date],
	[FEDate8] [date],
	[FDays8] [decimal](18, 0),
	[FQty8] [decimal](18, 2),
	[FPrice8] [decimal](18, 2),
	[FAcc8] [decimal](18, 2),
	[FItem9] [int],
	[FItemName9] [varchar](50),
	[FSDate9] [date],
	[FEDate9] [date],
	[FDays9] [decimal](18, 0),
	[FQty9] [decimal](18, 2),
	[FPrice9] [decimal](18, 2),
	[FAcc9] [decimal](18, 2),
	[FItem10] [int],
	[FItemName10] [varchar](50),
	[FSDate10] [date],
	[FEDate10] [date],
	[FDays10] [decimal](18, 0),
	[FQty10] [decimal](18, 2),
	[FPrice10] [decimal](18, 2),
	[FAcc10] [decimal](18, 2),
	[FItem11] [int],
	[FItemName11] [varchar](50),
	[FSDate11] [date],
	[FEDate11] [date],
	[FDays11] [decimal](18, 0),
	[FQty11] [decimal](18, 2),
	[FPrice11] [decimal](18, 2),
	[FAcc11] [decimal](18, 2),
	[FItem12] [int],
	[FItemName12] [varchar](50),
	[FSDate12] [date],
	[FEDate12] [date],
	[FDays12] [decimal](18, 0),
	[FQty12] [decimal](18, 2),
	[FPrice12] [decimal](18, 2),
	[FAcc12] [decimal](18, 2),
	[FItem13] [int],
	[FItemName13] [varchar](50),
	[FSDate13] [date],
	[FEDate13] [date],
	[FDays13] [decimal](18, 0),
	[FQty13] [decimal](18, 2),
	[FPrice13] [decimal](18, 2),
	[FAcc13] [decimal](18, 2),
	[FItem14] [int],
	[FItemName14] [varchar](50),
	[FSDate14] [date],
	[FEDate14] [date],
	[FDays14] [decimal](18, 0),
	[FQty14] [decimal](18, 2),
	[FPrice14] [decimal](18, 2),
	[FAcc14] [decimal](18, 2),
	[FItem15] [int],
	[FItemName15] [varchar](50),
	[FSDate15] [date],
	[FEDate15] [date],
	[FDays15] [decimal](18, 0),
	[FQty15] [decimal](18, 2),
	[FPrice15] [decimal](18, 2),
	[FAcc15] [decimal](18, 2),
 CONSTRAINT [PK_Bill_PropertyDown] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Bill_PropertyDown] ADD  CONSTRAINT [DF_Bill_PropertyDown_FRDate]  DEFAULT (getdate()) FOR [FRDate]
GO

ALTER TABLE [dbo].[Bill_PropertyDown] ADD  CONSTRAINT [DF_Bill_PropertyDown_FCid]  DEFAULT ((0)) FOR [FCid]
GO

ALTER TABLE [dbo].[Bill_PropertyDown] ADD  CONSTRAINT [DF_Bill_PropertyDown_FAmount]  DEFAULT ((0)) FOR [FAmount]
GO

ALTER TABLE [dbo].[Bill_PropertyDown] ADD  CONSTRAINT [DF_Bill_PropertyDown_FCancel]  DEFAULT ((0)) FOR [FCancel]
GO

ALTER TABLE [dbo].[Bill_PropertyDown] ADD  CONSTRAINT [DF_Bill_PropertyDown_FPCount]  DEFAULT ((0)) FOR [FPCount]
GO

ALTER TABLE [dbo].[Bill_PropertyDown] ADD  CONSTRAINT [DF_Bill_PropertyDown_FItem1]  DEFAULT ((0)) FOR [FItem1]
GO

ALTER TABLE [dbo].[Bill_PropertyDown] ADD  CONSTRAINT [DF_Bill_PropertyDown_FDays1]  DEFAULT ((0)) FOR [FDays1]
GO

ALTER TABLE [dbo].[Bill_PropertyDown] ADD  CONSTRAINT [DF_Bill_PropertyDown_FBType]  DEFAULT ((0)) FOR [FBType]
GO
